home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / cnet / cnettoolkit2a.lha / Routines / PARSE_NOSORT < prev    next >
Text File  |  1994-12-13  |  540b  |  12 lines

  1. PARSE: procedure expose it.; arg rng,min,max,srt
  2.    it.='';c=0;it=translate(rng,'  ','.,')
  3.     do a=1 to words(it);c=c+1;it.c=word(it,a)
  4.         if index(it.c,'-')>0 then do;parse var it.c x'-'y
  5.         if y='' then y=max;if x='' then x=min
  6.         if x>y then do;d=x;x=y;y=d;end
  7.         if x<min|y>max|~datatype(x,'W')|~datatype(y,'W') then do;c=c-1;iterate;end
  8.         do b=x to y;it.c=b;c=c+1;end;c=c-1;end
  9.     else if it.c<min|it.c>max|~datatype(it.c,'W') then do;c=c-1;iterate;end;end
  10.     do i=1 to c;it.0=it.0||it.i' ';end
  11.   return c
  12.